<?php

namespace cf\api\session;

require_once dirname(__FILE__).'/../session.php';

function set($name, $value=false)
{
	\cf\session::open();
	if ($value) {
		\cf\session::set($name, $value);
	} else {
		del($name);
	}
}

function has($name)
{
	\cf\session::open();
	return \cf\session::has($name);
}

function get($name)
{
	\cf\session::open();
	return \cf\session::has($name) ? \cf\session::get($name) : false;
}

function del($name)
{
	\cf\session::open();
	\cf\session::del($name);
}

?>